public class Solution1309 {
    public String freqAlphabets(String s) {
        StringBuilder stringBuilder=new StringBuilder();
        for (int i=0;i<s.length();i++){
            if (i+2<s.length() && s.charAt(i+2)=='#'){
                stringBuilder.append((char)(Integer.parseInt(s.substring(i,i+2))+'a'-1));
                i=i+2;
            }else {
                stringBuilder.append((char)(Integer.parseInt(s.substring(i,i+1))+'a'-1));
            }
        }
        return stringBuilder.toString();
    }

    public static void main(String[] args) {
        System.out.println(new Solution1309().freqAlphabets("10#11#12"));
    }
}
